package com.glsc.ngateway.common.xir.domain;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name = "XIR_TRD.TTRD_SET_INSTRUCTION_SECU")
public class TtrdSetInstructionSecu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 证券结算指令序号
     */
    @Id
    @Column(name = "INST_SECU_ID", nullable = false)
    private String instSecuId;

    /**
     * 主结算指令序号
     */
    @Column(name = "INST_ID", nullable = false)
    private String instId;

    /**
     * 业务类别 债券买入,债券卖出,债券质押,债券解质押
     */
    @Column(name = "BIZTYPE", nullable = false)
    private String biztype;

    /**
     * 金融工具代码
     */
    @Column(name = "I_CODE", nullable = false)
    private String iCode;

    /**
     * 资产类型
     */
    @Column(name = "A_TYPE", nullable = false)
    private String aType;

    /**
     * 市场类型
     */
    @Column(name = "M_TYPE", nullable = false)
    private String mType;

    /**
     * 余额变动
     */
    @Column(name = "RT_L_AMOUNT", nullable = false)
    private String rtLAmount;

    /**
     * 全价成本变动
     */
    @Column(name = "RT_L_COST", nullable = false)
    private String rtLCost;

    /**
     * 净价成本变动
     */
    @Column(name = "RT_L_COST_NET", nullable = false)
    private String rtLCostNet;

    /**
     * 应计利息成本变动
     */
    @Column(name = "RT_L_COST_AI", nullable = false)
    private String rtLCostAi;

    /**
     * 费用成本变动
     */
    @Column(name = "RT_L_COST_FEE", nullable = false)
    private String rtLCostFee;

    /**
     * 簿记状态标志位 XXXX    1位-簿记基本指令 ; 2位-簿记付款确认 ;  3位-簿记收款确认 ; 4位-簿记合同
     */
    @Column(name = "BJ_STATE", nullable = false)
    private String bjState;

    /**
     * 状态修改者
     */
    @Column(name = "OPERATOR")
    private String operator;

    /**
     * 核算业务分类
     */
    @Column(name = "SETTLE_BIZTYPE", nullable = false)
    private String settleBiztype;

    /**
     * 有效日期
     */
    @Column(name = "BEG_DATE", nullable = false)
    private String begDate;

    /**
     * 失效日期
     */
    @Column(name = "END_DATE", nullable = false)
    private String endDate;

    /**
     * 备注
     */
    @Column(name = "MEMO")
    private String memo;

    /**
     * 外部确认编号
     */
    @Column(name = "EXT_SERIALNO")
    private String extSerialno;

    /**
     * 创建时间
     */
    @Column(name = "CREATE_TIME")
    private Date createTime;

    /**
     * 最后修改人
     */
    @Column(name = "UPDATE_USER")
    private String updateUser;

    /**
     * 实际应计利息
     */
    @Column(name = "RT_L_COST_AI_REAL")
    private String rtLCostAiReal;

    /**
     * 实际净价成本
     */
    @Column(name = "RT_L_COST_NET_REAL")
    private String rtLCostNetReal;

    /**
     * 实收历史利息
     */
    @Column(name = "RT_L_COST_AI_HIS_REAL")
    private String rtLCostAiHisReal;

    /**
     * 外部证券账户
     */
    @Column(name = "SECU_EXT_ACCID")
    private String secuExtAccid;

    /**
     * 内部证券账户代码
     */
    @Column(name = "SECU_ACCID")
    private String secuAccid;

    /**
     * 业务记账标记
     */
    @Column(name = "ACCOUNT_BIZ_FLAG")
    private String accountBizFlag;

    /**
     * 财务记账标记
     */
    @Column(name = "ACCOUNT_FLAG")
    private String accountFlag;

    /**
     * 冻结解冻数量(债券质解押、托管转出等所有冻结解冻业务)
     */
    @Column(name = "RT_L_FRE_AMOUNT")
    private String rtLFreAmount;

    /**
     * 质押质解押冻结解冻数量(仅债质解押的冻结解冻数量。使用已有的额度字段（RT_L_QUO_AMOUNT）。)
     */
    @Column(name = "RT_L_QUO_AMOUNT")
    private String rtLQuoAmount;

    /**
     * 簿记券数量(银行间的质押式逆回购的质押券券指令也要生成，并且RT_L_AMOUNT等字段都是零，为了用于指令匹配，需要把质押数量填在该字段上，业务类型为无)
     */
    @Column(name = "BJ_AMOUNT")
    private String bjAmount;

    /**
     * 债券质押率(如果为空，系统默认其值为100%)
     */
    @Column(name = "BJ_DISCOUNT")
    private String bjDiscount;

    /**
     * 多空标志；L-多头、S-空头；
     */
    @Column(name = "LS")
    private String ls;

    /**
     * 保证金占用或释放
     */
    @Column(name = "RT_MARGINUSED")
    private String rtMarginused;

    /**
     * 验券结果
     */
    @Column(name = "PRECHECKSTATE")
    private String precheckstate;

    /**
     * 最后修改时间
     */
    @Column(name = "UPDATE_TIME")
    private Date updateTime;

}
